home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Palettes / MiscPaperViewPalette / MiscColorViewInspector.m < prev    next >
Text File  |  1995-07-20  |  1KB  |  55 lines

  1. // Copyright (C) 1995
  2. // Use is governed by the MiscKit license
  3.  
  4. #import "MiscColorViewInspector.h"
  5. #import <misckit/MiscColorView.h>
  6.  
  7. @implementation MiscColorViewInspector
  8.  
  9. // Load the Inspector
  10.  
  11. - init
  12. {
  13.     char        buf[MAXPATHLEN + 1];
  14.     id        bundle;
  15.     
  16.     [super init];
  17.     
  18.     bundle = [NXBundle bundleForClass:[MiscColorView class]];
  19.  
  20.     if( [bundle getPath:buf forResource:"MiscColorViewInspector" 
  21.                             ofType:"nib"] )
  22.         [NXApp loadNibFile:buf owner:self withNames:NO fromZone:[self zone]];
  23.  
  24.     return self;
  25. }
  26.  
  27. // Query the object for it's attributes
  28.  
  29. - revert:sender
  30. {
  31.     [backgroundColorWell setColor:[object backgroundColor]];
  32.     [desktopcolorSwitch setState:[object hasSameColorAsDesktop]];
  33.  
  34.     return [super revert:sender];
  35. }
  36.  
  37. - colorChanged:sender
  38. {
  39.     [object setBackgroundColor:[sender color]];
  40.     return [super ok:sender];
  41. }
  42.  
  43. - desktopcolorUseChanged:sender
  44. {
  45.     [object setUseSameColorAsDesktop:[desktopcolorSwitch state]];
  46.     return [super ok:sender];
  47. }
  48.  
  49. - (BOOL)wantsButtons
  50. {
  51.     return NO;
  52. }
  53.  
  54. @end
  55.